<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="com.goexchange.data.Subscriber" %>
<%@ page import="java.util.List" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Subscriber List</title>
</head>
<body>
<%
	@SuppressWarnings("unchecked")
	List<Subscriber> results = (List<Subscriber>)request.getAttribute("results");
	if(results == null)
		out.println("<h1>No data</h1>");
	else{
%>
<table border="1">

<tr>
<td><h3>No.</h3></td><td><h3>Email</h3></td><td><h3>Date</h3></td>
</tr>

<%
		for(Subscriber s: results){
%>
<tr>
	<td><%= s.getID() %></td>
	<td><%= s.getEmail() %></td>
	<td><%= s.getDate() %></td>
</tr>
<%
		}
	}
%>
</table>
</body>
</html>